package tools.oma;

import java.util.TreeSet;

public class consenseCluster_cluster <m>{
	int support;
	TreeSet<m> cluster;
	
	public consenseCluster_cluster(){
		this(new TreeSet<m>(),0);
	}
	public consenseCluster_cluster(TreeSet<m> hs){
		this(hs,1);
	}
	
	public consenseCluster_cluster(TreeSet<m> hs, int s){
		support=s;
		cluster=hs;
	}
	
	public boolean equals(TreeSet<m> b){
		return this.cluster.size()==b.size()&&this.cluster.containsAll(b);
	}
	
	public boolean equals(consenseCluster_cluster<m> b){
		return this.equals(b.cluster);
	}
	
	public int size(){
		return cluster.size();
	}

	public TreeSet<m> getCluster() {
		return cluster;
	}

	public void increaseSupport(int a){
		support+=a;
	}
	
	public int getSupport() {
		return support;
	}

	public void setSupport(int support) {
		this.support = support;
	}
}
